package com.star.system.struct;

import com.star.system.dto.DictSaveDTO;
import com.star.system.dto.DictUpdateDTO;
import com.star.system.entity.Dict;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 字典转对象
 *
 * @author yangzj
 */
@Mapper
public interface DictStruct {
    DictStruct INSTANCE = Mappers.getMapper(DictStruct.class);

    /**
     * to Dict
     *
     * @param dto dto
     * @return {@link Dict}
     */
    Dict to(DictSaveDTO dto);

    /**
     * to Dict
     *
     * @param dto dto
     * @return {@link Dict}
     */
    Dict to(DictUpdateDTO dto);
}
